/*
 * <pre>
 * Copyright (c) The Loose Coupling Team.
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License. 
 * You may obtain a copy of the License at 
 *
 *      http://www.apache.org/licenses/LICENSE-2.0 
 *
 * Unless required by applicable law or agreed to in writing, software 
 * distributed under the License is distributed on an "AS IS" BASIS, 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
 * See the License for the specific language governing permissions and 
 * limitations under the License.
 *</pre>
 */
package org.lc.eic.core.support.logging;

import org.slf4j.LoggerFactory;


/**
 *  TODO: The default logger implementation.. it currently uses the slf4j-framework..
 *	@author <a href="mailto:p.lycke@googlemail.com">PaLy</a>
 *
 * 
 */
public class DefaultLogger implements Logger {
	
	private org.slf4j.Logger slf4jLogger;
	
	
	public DefaultLogger(Class clazz){
		this(clazz.getName());
	}
	
	public DefaultLogger(String loggerId){
		this.slf4jLogger = LoggerFactory.getLogger(loggerId);
	}

	public void debug(String message) {
		slf4jLogger.debug(message);
	}
	
	public void debug(String message, Throwable throwable) {
		slf4jLogger.debug(message, throwable);		
	}

	public void error(String message) {
		slf4jLogger.error(message);
	}

	public void error(String message, Throwable throwable) {
		slf4jLogger.error(message, throwable);
	}

	public void info(String message) {
		slf4jLogger.info(message);
	}

	public boolean isDebugEnabled() {
		return slf4jLogger.isDebugEnabled();		
	}

	public boolean isInfoEnabled() {
		return slf4jLogger.isInfoEnabled();
	}

	public void warn(String message) {
		slf4jLogger.warn(message);
	}

	public void warn(String message, Throwable throwable) {
		slf4jLogger.warn(message, throwable);
	}

}
